package com.daedalus.Polimorfizmi.InterfaceAbstractShape;

public class Tetraeder extends ThreeDimensionalShape{

	public Tetraeder(double dim) {
		super(dim);
	}

	@Override
	public double getArea() {
		return 4.0*getDimension()*Math.sqrt(3)/2.0;
	}

	@Override
	public double getVolume() {
		return Math.sqrt(2)*Math.pow(getDimension(), 2)/2.0;
	}
	public String toString(){
		return String.format("Object : Tetraeder  \n Brinja: %.2f",getDimension());
	}
}
